package com.easyexcle.demo.easyExcel.collect;

import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.format.DateTimeFormat;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.easyexcle.demo.easyExcel.annotion.CollectCustomMerge;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

/**
 * @Author: lkz
 * @Title: OrderData
 * @Description: 测试集合一对多关系
 * @Date: 2023/7/5 9:09
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class OrderData {


    @ExcelProperty(value = "订单编码")
    @ColumnWidth(20)
    @CollectCustomMerge(needMerge = true,isPk = true)
    private String orderSn;
    @ExcelProperty(value = "创建时间")
    @ColumnWidth(20)
    @DateTimeFormat("yyyy-MM-dd")
    @CollectCustomMerge(needMerge = true)
    private Date createTime;
    @ExcelProperty(value = "收货地址")
    @CollectCustomMerge(needMerge = true)
    @ColumnWidth(20)
    private String receiverAddress;

    @ExcelProperty(value = {"商品信息", "商品编码"})
    @ColumnWidth(20)
    private String productSn;
    @ExcelProperty(value = {"商品信息", "商品名称"})
    @ColumnWidth(20)
    private String name;
    @ExcelProperty(value = {"商品信息", "商品标题"})
    @ColumnWidth(30)
    private String subTitle;


}
